/*
 * Copyright (c) 2025 Huawei Device Co., Ltd. All rights reserved
 * Use of this source code is governed by a MIT license that can be
 * found in the LICENSE file.
 */

import React from "react";
import { View, Text, Button } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import AMapDemo from './AMapDemo'

const Stack = createStackNavigator();
class Entrance extends React.Component {
    onPress = () => {
        this.props.navigation.navigate('AMapDemo');
    }

    render() {
        return (
            <View style={{ padding: 14 }}>
                <View style={{ height: 50 }}>
                    <Button title='获取当前位置' onPress={this.onPress}> </Button>
                </View>
            </View>
        )
    }
}

class AMapApp extends React.Component {
    render() {
        return (
            <NavigationContainer>
                <Stack.Navigator initialRouteName="amap3d测试">
                    <Stack.Screen name="amap3d" component={Entrance} />
                    <Stack.Screen name="AMapDemo" component={AMapDemo} />
                </Stack.Navigator>
            </NavigationContainer>
        )
    };
}

//export default App
export default AMapApp;